<!doctype html>
<html lang="zh">
<head>
  <meta charset="utf-8"/>
  <title>jQuery Ajax - Load</title>
  <script src="jquery-1.11.2.min.js"></script>
  <script>
    $(function() {
      $("#btnAjaxGet").click(function(event) {
        //发送Get请求
        $("#divResult").load("../data/AjaxGetMethod.aspx?param=btnAjaxGet_click" + "&timestamp=" + (new Date()).getTime());
      });

      $("#btnAjaxPost").click(function(event) {
        //发送Post请求
        $("#divResult").load("../data/AjaxGetMethod.aspx", { "param": "btnAjaxPost_click" });
      });

      $("#btnAjaxCallBack").click(function(event) {
        //发送Post请求, 返回后执行回调函数.
        $("#divResult").load("../data/AjaxGetMethod.aspx", { "param": "btnAjaxCallBack_click" }, function(responseText, textStatus, XMLHttpRequest)
        {
          responseText = " Add in the CallBack Function! <br/>" + responseText
          $("#divResult").html(responseText); //或者: $(this).html(responseText);
        });
      });

      $("#btnAjaxFiltHtml").click(function(event) {
        //发送Get请求, 从结果中过滤掉 "anshan" 这一项
        $("#divResult").load("../data/AjaxGetCityInfo.aspx?resultType=html" + "&timestamp=" + (new Date()).getTime() + " ul>li:not(:contains('anshan'))");
      });
    });
  </script>
</head>
<body>    
  <button id="btnAjaxGet">use load execute get request</button><br />
  <button id="btnAjaxPost">use load execute post request</button><br />
  <button id="btnAjaxCallBack">use has callback load method</button><br />
  <button id="btnAjaxFiltHtml">use selector filter response HTML</button>
  <br />
  <div id="divResult"></div>
</body>
</html>